package com.tjetc.dao;

import com.tjetc.domain.Doctor;
import com.tjetc.utils.PageInfo;

import java.sql.SQLException;
import java.util.List;

public interface DoctorDao {

    Doctor login(String username, String password) throws SQLException;

    Doctor getById(int id) throws SQLException;

    Doctor findByName(String username) throws SQLException;

    //查询前五的名医，用来在添加科室的时候选择主任
    List<Doctor> selectFifth() throws SQLException;

    //查询子科室下的医生
    List<Doctor> queryByDepid(int depid) throws SQLException;

    int getCount(String name) throws SQLException;

    List<Doctor> list(String name, PageInfo<Doctor> pageInfo) throws SQLException;

    void add(Doctor doctor) throws SQLException;

    int update(Doctor doctor) throws SQLException;

    void del(int id) throws SQLException;

    List<Doctor> listAll() throws SQLException;
    //查询某有医生所在的科室
    int getDepidById(int id) throws SQLException;
    Doctor getpwdById(int id) throws SQLException;

    int updatepwd(Doctor doctor) throws SQLException;
}
